Skip to content

WEB/CI: Use GITHUB_TOKEN when making Github API calls #50837

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jan 19, 2023

Conversation

mroeschke
Copy link
Member

Follow up to #50811, might as well still make authenticated API calls to Github

@mroeschke mroeschke added CI Continuous Integration Web pandas website labels Jan 18, 2023
@lithomas1
Copy link
Member

Wouldn't you have to expose the token using a with: block as well?
(e.g.

with:
environment-file: ${{ env.ENV_FILE }}
which is setting the environment-file env var)

I doubt that the GITHUB_TOKEN would be directly accessible without doing it (IIRC secrets are encrypted).

@mroeschke
Copy link
Member Author

It's already here

GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
(it wasn't removed in #50811)

@lithomas1
Copy link
Member

Ah, makes sense. Sorry for the noise.

@mroeschke mroeschke added this to the 2.0 milestone Jan 19, 2023
@mroeschke mroeschke merged commit 2546604 into pandas-dev:main Jan 19, 2023
@mroeschke mroeschke deleted the web/api_token branch January 19, 2023 02:20
@datapythonista
Copy link
Member

Sorry to remove that, I assumed it was to fix the quota problem, and that it didn't work. What is this doing? Is it increasing the quota, or something else?

@mroeschke
Copy link
Member Author

Yeah I think authenticating with the GIthub Token bumps up our requests/hour (but is still limited) https://docs.github.com/en/rest/overview/resources-in-the-rest-api?apiVersion=2022-11-28#rate-limits-for-requests-from-github-actions

@datapythonista
Copy link
Member

Did you check if the token is working as expected? I see github send some headers with the limits: https://docs.github.com/en/rest/overview/resources-in-the-rest-api?apiVersion=2022-11-28#rate-limit-headers

We should have quota for more than 20 web builds per hour with the 1,000 limit (not considering we were caching most of them in theory), and it felt that the CI was failing pretty quickly anyway. Since secrets aren't available for PRs, only for commits, I guess this may be indeed helping the commit builds, the ones that are deployed and really matter. Not sure if the failures I saw were mainly PRs.

pooja-subramaniam pushed a commit to pooja-subramaniam/pandas that referenced this pull request Jan 25, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CI Continuous Integration Web pandas website
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants